I am looking to automatically fetch some new (and large) content in the background while the app is closed. The content that needs to be downloaded is user specified, and as such doesn't need to run on install or update, but only periodically to see if the content has been updated.
The app is a mac app, and I wanted to know if Background Assets is a good choice for this, as the app may not always be running, and I'd like for the user's content to be updated seemingly when they open the app.
If this is the right course of action, what is a recommended way of implementing this?
I was thinking of scheduling a request to check for updated assets in BADownloaderExtension.download() and then checking in
BADownloaderExtension.backgroundDownload(_:finishedWithFileURL:) if are new content, and then schedule the download of new content or if it is new content then installing it appropriately from there.
Thank you
- Bastian
Post
Replies
Boosts
Views
Activity
I just created a url bookmark (to be saved to db) and immediately read the bookmark afterwards. This line throws an error Error Domain=NSCocoaErrorDomain Code=4 "The file doesn’t exist."
let url = try URL(
resolvingBookmarkData: bookmark,
options: .withoutUI,
bookmarkDataIsStale: &isStale
)
This works perfectly fine in iOS 13, but the error throws in 14b3, did something change, or is this a beta bug?